const express = require('express')
const router = express.Router()
const path = require('path')
const upload_handler = require('../router_handler/upload')
// 上传图片模块
const multer = require('multer')
// 生成的图片放入uploads文件夹下
const upload = multer({dest: path.join(__dirname, '../public/uploads')})

router.post('/img',upload.single('file'),upload_handler.uploadImg)

// 将路由对象共享出去
module.exports = router